This invention relates generally to digital image scanning and more specifically to image scanners having segmented photosensor arrays.
Image scanners convert a visible image on a document or photograph, or an image in a transparent medium, into an electronic form suitable for copying, storing or processing by a computer. Reflective image scanners typically have a controlled source of light, and light is reflected off the surface of a document, through an optics system, and onto an array of photosensitive devices. The photosensitive devices convert received light intensity into an electronic signal. Some imaging devices, for example digital cameras, have a two-dimensional photosensor array. Other imaging devices have a one-dimensional photosensor array, and the overall image is formed one raster line at a time by providing relative movement between the object being scanned and the photosensor array. In some scanners, light from an object being scanned is reduced by the optics system onto a photosensor array having a length that is quite small relative to the width of the object being scanned. Small photosensor arrays may be fabricated as a single integrated device. In other scanners, the object is focused onto an array of photosensors using optics having a one-to-one magnification, so that the length of the photosensor array is the same as the width of the object being scanned. These relatively long arrays are typically manufactured by assembling multiple segments. Segments may abut end-to-end, or segments may have gaps between ends. The present patent document is primarily concerned with one-dimensional segmented photosensor arrays, but it is not important whether the ends abut, or whether the ends have gaps.
A picture element (pixel) may be defined as an area on the image being scanned, or as an area on a photosensor array, or as a set of numbers in the data representing an image. For document scanners and transparent film scanners, a pixel is commonly defined as an area on the surface of the document being scanned. For example, for document and transparent film scanners, a common specification is xe2x80x9cpixels per inchxe2x80x9d (or mm) as measured on the surface of the document being scanned.
For segmented photosensor arrays, alignment of the segments is important. Visually, an error in photosensor position of about one pixel is minor. Therefore, if visual appearance is the only requirement, the segments may be mounted with a spatial accuracy that ensures that actual pixel locations will not deviate from ideal locations by more than about the pitch of the photosensor elements. In some applications, however, precise pixel positioning is needed for reasons other than visual appearance. For example, hand scanners require an operator to manually move a sensor array over an original image, capturing image data in relatively narrow swathes. Image processing software then stitches the various swathes together. Stitching error can result in accumulation of error in the computed position of the scanner on the page. The stitching algorithms may require pixel accuracy to be, for example, less than half the pitch of the photosensor elements.
Placing photosensor array segments over a relatively long length with high precision is technically challenging. High precision adds cost due to the alignment equipment and mounting techniques required, and more importantly, adds cost due to scrapping of photosensor assemblies that do not meet specifications. If the specifications push the state of the art, yield may drop substantially, and relatively small changes in the specification may make significant improvements in yield. There is a need to be able to relax mechanical alignment requirements for photosensor segment alignment, while still providing accurate information needed for image stitching and scanner positioning.
The following discussion provides additional background for a prior art hand held scanner to provide an example of a device where the invention may be used, and to facilitate later discussion of the invention in light of the prior art. A example of a scanning device for which the invention is applicable may be found in U.S. Pat. No. 5,578,813 (Allen ""813). Allen ""813 describes a hand-held scanner in which a scan-line is defined by the position of a linear array of photosensors. The linear sensor array measures image intensity at uniform positions between the ends of a scan-line. The scan-line may be skewed relative to the sides of the document being scanned and the skew may change as the scanner is moved. In general, the intensity samples measured by the scanner do not fall on a uniform rectangular grid. Separate position sensors monitor the positions of the ends of the scan-line, relative to a starting reference position, as the scanner is moved across the page. Position-tagged intensity data is used to compute image pixels at discrete points on a uniform rectangular pixel grid. The process of transforming a digital image from one set of pixel coordinates to another set of pixel coordinates is called geometric image resampling. Resampling from non-rectangular coordinates to rectangular coordinates is called image rectification.
Ideally, the rectangular pixel grid has grid lines that are parallel to the sides of the document. For example, if a complete image is saved in memory, image analysis may be performed to determine margins, or edges of photographic images, or other information indicating the orientation of the document. Alternatively, the first scan-line may be used to define a reference position and one of two orthogonal directions. All scan-lines after the first may then be resampled to a rectangular grid that is defined relative to the first scan-line. In the following discussion, for convenience of illustration, pixel grids are depicted as square, having the same pitch for each of the two orthogonal directions. Likewise, for convenience of illustration, the optical sampling rate of the scanner along the direction of movement is depicted as the same as the optical sampling rate along the scan-line. In general, however, each of the two orthogonal directions of the pixel grid may have a different pixel pitch. Likewise, the scanner may have one optical sampling rate along the scan-line and a different optical sampling rate orthogonal to the scan line.
FIGS. 1-4 further illustrate prior art hand-held scanning and image resampling. In FIG. 1, a hand-held scanner 100 is manually moved across the surface of a document 102 along a serpentine path 102. FIGS. 2, 3A and 3B illustrate prior art resampling. FIG. 2 illustrates a scan-line 200 with image intensities measured at discrete points 202 along the scan-line. Also illustrated in FIG. 2 is a grid of pixel locations 204. The lines of the pixel grid are ideally parallel to the sides of the document, but may be determined by the first scan-line as discussed above. Separate position sensors (see FIG. 4) are used to measure the relative movement of the ends of the scan-line 200. Given a starting reference position, and given the relative movements of the ends of the scan-line, and given the positions of the measured intensities 202 relative to the ends of the scan-line, the position of each measured intensity 202 may be determined relative to the reference position. The measured intensities 202, and sufficient information to determine the position of each measured intensity 202, may be stored in a memory for later rectification, or rectification may be computed in real time as the intensity data is generated.
FIG. 3A illustrates a series of scan-lines (300, 302, 304, 306) determined by the position of the linear sensor array of the scanner as the scanner is moved across the document being scanned. Each intensity measurement from the scanner sensor array has been assigned a lower-case letter. FIG. 3A also illustrates a grid of pixel locations. The pixel locations have been assigned location notations relative to an arbitrary reference location (X0, Y0). To simplify illustration, in FIG. 3A, each scan-line has five photosensor elements and five intensity measurements. In a typical actual scanner, one linear sensor array may comprise thousands of individual photosensor elements.
FIG. 3B illustrates one example method of computing intensities at the pixel locations from measured intensities from the scanner sensor array. One method for computing image rectification is bilinear interpolation using the intensities of the four closest neighboring sensor values. See, for example, Christopher D. Watkins, et al., Modern Image Processing: Warping, Morphing, and Classical Techniques, (Cambridge, Mass., Academic Press, 1993), pp. 99-102. A version of bilinear interpolation, as applied to FIG. 3A, is illustrated in FIG. 3B. In FIG. 3B, the (X,Y) locations of sensor values (d), (e), (i), and (j), and the (X,Y) location of pixel (X0+1, Y0+4) are all known. First, the intensity at point 308 (at X=X0+1) is determined by interpolation between the intensity values for sensor measurements (d) and (i), at the physical locations of sensor measurements (d) and (i). Next, the intensity at point 310 (at X=X0+1) is determined by interpolation between the intensity values for sensor measurements (e) and (j) at the physical locations of sensor measurements (e) and (j). Finally, the intensity at pixel (X0+1, Y0+4) is determined by interpolation at Y0, along X=X0+1, between the intensities at points 308 and 310.
FIG. 4 illustrates a simplified block diagram of a prior art system implementing a hand-held scanner in accordance with FIGS. 1, 2, 3A and 3B. A linear image sensor array 400 measures intensities along a scan-line determined by the position of array 400 on a document being scanned. Position sensors 402 sense the relative movements of the ends of the sensor array 400. A position data system 408 determines relative positions of the end-points of the scan-line. An image data system 406 receives analog intensity measurements from the linear sensor array 400, and uses an analog-to-digital converter to convert the analog image values into numeric image values. A rectification system 408 receives position data from the position data system 404 and numeric image data from the image data system 406 and computes resampled pixel data. The position data system 404 may be a processor or may be specialized electronics. The position data and the image data may or may not be stored in a memory before being sent to the rectification system. Typically, the rectified image data generated by the rectification system is stored in Random Access Memory (RAM).
During scanner manufacturing, photosensor segment alignment data, such as segment position offset and segment angle, is measured. The offset and angle are stored in non-volatile memory within the scanner. A position correction system uses the stored alignment data to correct position and angle values before being processed by a rectification system. Most pixels require simple geometry calculations. However, a more complex state machine is needed to handle the transition from one photosensor segment to the next. Correcting for segment position offset and angle errors enables a cost reduction for the sensor array and, in particular, reduces costs associated with scrap.